package com.njmaomao.gj.pyot.domain.wechat.wechatapi.sandboxnew;

import com.njmaomao.gj.pyot.domain.wechat.wechatapi.ApiResp;
import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.util.Optional;

/**
 * 获取仿真系统验签秘钥出参
 * @author hh 2018-5-10
 * https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=23_1
 */
@XStreamAlias("xml")
public class GetSignkeyResp implements ApiResp {

    // 返回状态码 必填[是] SUCCESS/FAIL 此字段是通信标识，非交易标识
    @XStreamAlias("return_code")
    private String returnCode;

    // 返回信息 必填[否] 返回信息，如非空，为错误原因 ，签名失败 ，参数格式校验错误
    @XStreamAlias("return_msg ")
    private String returnMsg ;

    // 商户号 必填[是] 微信支付分配的微信商户号
    @XStreamAlias("mch_id")
    private String mchId;

    // 沙箱密钥 必填[否] 返回的沙箱密钥
    @XStreamAlias("sandbox_signkey")
    private String sandboxSignkey;


    @Override
    public String getReturnCode() {
        return returnCode;
    }

    @Override
    public Optional<String> getReturnMsg() {
        return Optional.ofNullable(returnMsg);
    }

    @Override
    public String getResultCode() {
        return "";
    }

    @Override
    public String getErrCode() {
        return "";
    }

    @Override
    public String getErrCodeDes() {
        return "";
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getSandboxSignkey() {
        return sandboxSignkey;
    }

    public void setSandboxSignkey(String sandboxSignkey) {
        this.sandboxSignkey = sandboxSignkey;
    }
}
